#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QSlider>
#include <QGridLayout>
#include <QPushButton>
#include <QLabel>
#include <QLineEdit>

enum ComponentYUVID{
	COMPONENT_Y = 0,
	COMPONENT_U,
	COMPONENT_V,
	COMPONENT_COUNT,
		
};


struct ComponentChoose {
	QLabel* label;
	QSlider* slider;
	QLineEdit* line_edit;
};


class MainWindow : public QMainWindow
{

public:
    MainWindow();

private:
	QWidget* central_widget;
	QGridLayout* central_widget_layout;
	
	QWidget* color_display_area;
	QGridLayout* color_select_area_layout;
	struct ComponentChoose com_choose[COMPONENT_COUNT]; 
	QWidget* color_select_area;
	
    void paintEvent(QPaintEvent *event) override;
	int update_output_color();

Q_OBJECT
public slots:	
	void y_slider_val_change(int val);
	void u_slider_val_change(int val);
	void v_slider_val_change(int val);
};

#endif // MAINWINDOW_H
